﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ListaCampañas.aspx.cs" Inherits="CROSLAND.WebApp.ListaCampañas" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<%@ Register assembly="IdeaSparx.CoolControls.Web" namespace="IdeaSparx.CoolControls.Web" tagprefix="cc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphHeader" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMainMenu" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphTopMenu" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cphTopContent" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="cphMain" runat="server">




    <asp:Panel runat="server" ID="pnlBusqueda">            
            <table width="100%">
                <tr>
                    <td>Campaña:</td>
                    <td>
                        <asp:DropDownList ID="cmbCampana" runat="server" Width="200px" />
                    </td>
                    <td>Población:</td>
                    <td>
                         <asp:DropDownList ID="cmbPoblacion" runat="server" Width="200px" />
                    </td>
                    <td>Fecha:</td>
                    <td>
                         <asp:TextBox ID="txtFecha" runat="server" Width="70px" CssClass="inputbox" Font-Size="10pt" /><cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtFecha" Format="dd/MM/yyyy" CssClass="MyCalendar" Enabled="True"></cc1:CalendarExtender>
                    </td>
                </tr>    
                <tr>
                    <td>Modelo:</td>
                    <td>
                        <asp:TextBox ID="txtModelo" runat="server" Width="120"></asp:TextBox>
                    </td>
                    <td>Color:</td>
                    <td>
                        <asp:DropDownList ID="cmbColor" runat="server" Width="200px" />
                    </td>
                </tr> 
                 <tr>                 
                    <td colspan="6" style="text-align:center">
                        <asp:Button ID="btnBuscar" OnClick="btnBuscar_Click" runat="server" Text="Buscar" />
                    </td>                    
                </tr>          
            </table>      
       </asp:Panel>
       <div style="clear:both"></div>

       <cc2:CoolGridView ID="gvListado" runat="server" Width="100%" Height="350px" 
           AllowPaging="true" PageSize="60"                         
                        CssClass="tbl-materiales" AutoGenerateColumns="false" 
            Font-Size="12px">
            <Columns>
                 <asp:TemplateField HeaderText="" HeaderStyle-Width="15px">
                      <ItemTemplate>
                                                  
                          <asp:ImageButton ID="btnBeneficio" runat="server" ImageUrl="~/img/stock2.png" />
                         
                          <asp:Panel ID="pnlBeneficio" runat="server" ScrollBars="Auto" Width="750px" CssClass="modalPopup" style="display:none">
                               <asp:Panel ID="pnlMoveBeneficio" runat="server" Width="100%" BackColor="lightblue" BorderColor="#6289AE" HorizontalAlign="Center">
                                        Beneficios
                               </asp:Panel>   
                               <div style="clear:both"></div> 
                               <br />   
                               <asp:GridView ID="gvBeneficio" runat="server" CssClass="tbl-stock" Width="100%" EmptyDataText="No hay datos registrados"
                                     AutoGenerateColumns="false" DataSource = '<%# Bind("ListaBeneficio") %>'>
                                      <Columns>
                                            <asp:BoundField DataField="campaña" HeaderText="Campaña" />
                                            <asp:BoundField DataField="material" HeaderText="Material" />
                                            <asp:BoundField DataField="materialTexto" HeaderText="Desc. Material" />
                                            <asp:BoundField DataField="cantidad" HeaderText="Cantidad" />                                  
                                      </Columns>
                                </asp:GridView>
           
                               <div style="width:100%; text-align:right; padding-top:5px;">
                                   <asp:ImageButton ID="btnOkBeneficio" runat="server" ImageUrl="~/img/ok16.png" ImageAlign="Middle"   />
                               </div>

                               <div style="clear:both"></div>    
                           </asp:Panel>
                           <cc1:ModalPopupExtender ID="mpeBeneficio" runat="server" TargetControlID="btnBeneficio" 
                                PopupControlID="pnlBeneficio"  BackgroundCssClass="modalBackground" 
                                PopupDragHandleControlID="pnlMoveBeneficio" CancelControlID="btnOkBeneficio" >
                            </cc1:ModalPopupExtender>
                                       
                      </ItemTemplate>
                 </asp:TemplateField>                                                
                 <asp:BoundField DataField="campaña" HeaderText="Campaña" HeaderStyle-Width="130px" ItemStyle-HorizontalAlign="Center">
                 </asp:BoundField> 
                 <asp:BoundField DataField="campañaTexto" HeaderText="Desc.Campaña" HeaderStyle-Width="200px" ></asp:BoundField> 
                 <asp:BoundField DataField="cityCodeTexto" HeaderText="Población" HeaderStyle-Width="120px" ></asp:BoundField> 
                 <asp:BoundField DataField="fechaI" HeaderText="Fecha Inicio" DataFormatString="{0:dd/MM/yyyy}"  HtmlEncode="False" 
                      HeaderStyle-Width="180" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="180px" />
                 </asp:BoundField>
                 <asp:BoundField DataField="fechaF" HeaderText="Fecha Fin" DataFormatString="{0:dd/MM/yyyy}"  HtmlEncode="False" 
                  HeaderStyle-Width="120" ItemStyle-HorizontalAlign="Center">
                    <HeaderStyle Width="120px" />                 
                 </asp:BoundField>
                 <asp:TemplateField HeaderText="Modelos" HeaderStyle-Width="80px"  ItemStyle-HorizontalAlign="Center">
                      <ItemTemplate>
                        
                        
                          <asp:ImageButton ID="btnModelo" runat="server" ImageUrl="~/img/flujo.png" />

                         
                          <asp:Panel ID="pnlModelo" runat="server" ScrollBars="Auto" Width="750px" CssClass="modalPopup" style="display:none">
                               <asp:Panel ID="pnlMoveModelo" runat="server" Width="100%" BackColor="lightblue" BorderColor="#6289AE" HorizontalAlign="Center">
                                        Modelos
                               </asp:Panel>   
                               <div style="clear:both"></div>   
                               <br /> 
                                 <asp:GridView ID="gvModelo" runat="server" CssClass="tbl-stock" Width="100%" EmptyDataText="No hay datos registrados" 
                                        AutoGenerateColumns="false" DataSource = '<%# Bind("ListaModelo") %>'>
                                             <Columns>
                                                    <asp:BoundField DataField="campaña" HeaderText="Campaña" />
                                                    <asp:BoundField DataField="modelo" HeaderText="Modelo" />
                                                    <asp:BoundField DataField="modeloTexto" HeaderText="Desc. Modelo" />
                                                    <asp:BoundField DataField="color" HeaderText="Color" />
                                                    <asp:BoundField DataField="colorTexto" HeaderText="Desc. Color" />
                                             </Columns>
                                        </asp:GridView>      
           
                               <div style="width:100%; text-align:right; padding-top:5px;">
                                   <asp:ImageButton ID="btnOkModelo" runat="server" ImageUrl="~/img/ok16.png" ImageAlign="Middle"   />
                               </div>

                               <div style="clear:both"></div>    
                           </asp:Panel>
                           <cc1:ModalPopupExtender ID="mpeModelo" runat="server" TargetControlID="btnModelo" 
                                PopupControlID="pnlModelo"  BackgroundCssClass="modalBackground" 
                                PopupDragHandleControlID="pnlMoveModelo" CancelControlID="btnOkModelo" >
                            </cc1:ModalPopupExtender>          
                        
                                    
                      </ItemTemplate>
                  </asp:TemplateField> 
            </Columns>                        
             <HeaderStyle BackColor="Silver" />
            <BoundaryStyle BorderColor="Gray" BorderStyle="Solid" BorderWidth="1px" />
      </cc2:CoolGridView>

</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="cphFooter" runat="server">
</asp:Content>
